home *** CD-ROM | disk | FTP | other *** search
/ Apple Developer Connection Student Program / ADC Tools Sampler CD Disk 3 1999.iso / Metrowerks CodeWarrior / Java Support / Java_Source / IFC_112 / netscape / application / KeyboardArrow.java < prev    next >
Encoding:
Text File  |  1999-05-28  |  1.0 KB  |  51 lines  |  [TEXT/CWIE]

  1. // KeyboardArrow.java
  2. // By Ned Etcode
  3. // Copyright 1995, 1996, 1997 Netscape Communications Corp. All rights reserved.
  4.  
  5. package netscape.application;
  6.  
  7.  
  8. /** A private subclass of internal window for the keyboard arrow **/
  9.  
  10. class KeyboardArrow extends InternalWindow {
  11.     Image image;
  12.     View  view;
  13.  
  14.     public KeyboardArrow() {
  15.         super(Window.BLANK_TYPE,0,0,0,0);
  16.         setTransparent(true);
  17.         setLayer(IGNORE_WINDOW_CLIPVIEW_LAYER+10);
  18.         setCanBecomeMain(false);
  19.     }
  20.  
  21.     public void setImage(Image anImage) {
  22.         image = anImage;
  23.         if(image != null) {
  24.             sizeTo(image.width(),image.height());
  25.         } else {
  26.             sizeTo(0,0);
  27.         }
  28.     }
  29.  
  30.     public void drawView(Graphics g) {
  31.         if(image!=null)
  32.             image.drawAt(g,0,0);
  33.     }
  34.  
  35.     public boolean mouseDown(MouseEvent event) {
  36.         return false;
  37.     }
  38.  
  39.     void setView(View aView) {
  40.         view = aView;
  41.     }
  42.  
  43.     View view() {
  44.         return view;
  45.     }
  46.  
  47.     public boolean canBecomeSelectedView() {
  48.         return false;
  49.     }
  50. }
  51.